package 
{
	import flash.desktop.NativeApplication;
	import flash.events.Event;
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.ui.Multitouch;
	import flash.ui.MultitouchInputMode;
	import flash.filesystem.File;
	import flash.system.Capabilities;
	
	/**
	 * ...
	 * @author Lighter
	 */
	[SWF(width="320", height="480", frameRate="60", backgroundColor="#000000")]
	public class demo_mobile extends Sprite 
	{
		
		private var demo:Demo;
		
		public function demo_mobile() 
		{
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
			stage.addEventListener(Event.DEACTIVATE, deactivate);
			
			// touch or gesture?
			Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
			
			var sPlatform:String = Capabilities.version.substr(0, 3);
            var sVersion:String = Capabilities.version.substr(4);
			var isDesktop:Boolean = /(WIN|MAC|LNX)/.exec(sPlatform) != null;
			
			// Entry point
			// New to AIR? Please read *carefully* the readme.txt files!
			var dataPath:String = File.applicationDirectory.toString();
			var pathFile:File = new File(File.applicationDirectory.nativePath.toString()+"/../../Demo/assets");
			demo = new Demo(this,"app:");
		}
		
		private function deactivate(e:Event):void 
		{
			// make sure the app behaves well (or exits) when in background
			//NativeApplication.nativeApplication.exit();
		}
		
	}
	
}